package com.imti.controller;




import com.github.pagehelper.PageHelper;
import com.imti.Api.CommonResult;
import com.imti.entity.DrugCharge;
import com.imti.service.DrugChargeService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;

import java.util.List;

/**
 * 收费项目(DrugCharge)表控制层
 *
 * @author makejava
 * @since 2023-02-03 17:46:39
 */
@RestController
@RequestMapping("drugCharge")
public class DrugChargeController {

    @Autowired
    private DrugChargeService drugChargeService;

    /**
     * 查询收费项目
     * @param itemName
     * @return
     */
    @GetMapping("findDrugChargeByName")
    public CommonResult<List<DrugCharge>> findDrugChargeByName(String itemName,Integer pageSize,Integer pageNum){
        if (itemName==""||itemName==null){
            itemName="";
        }
        PageHelper.startPage(pageNum, pageSize);
        return  CommonResult.success(drugChargeService.findDrugChargeByName(itemName));
    }
}

